package com.Smart.smartscals.CustomView;

import java.util.ArrayList;

import com.Smart.smartscals.Activity.R;
import com.Smart.smartscals.Adapter.CustomWeightPagerAdapter;
import com.Smart.smartscals.Adapter.GalleryAdapter;
import com.Smart.smartscals.Utils.Tools;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.support.v4.view.ViewPager.LayoutParams;
import android.support.v4.view.ViewPager.OnPageChangeListener;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.widget.Gallery;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

public class CustomWeightView extends LinearLayout {
	private Context mContext;
	private View mView;
	private CustomViewPager mViewPager;
	private CustomWeightPagerAdapter mCustomWeightPagerAdapter;


	private ArrayList<String> arrayListStr;

	public CustomWeightView(Context context, AttributeSet attrs) {
		super(context, attrs);

		mContext = context;
		initView();

	}

	private void initParam() {

		mCustomWeightPagerAdapter = new CustomWeightPagerAdapter(arrayListStr,
				mContext, this);
		mViewPager.setAdapter(mCustomWeightPagerAdapter);

	}

	public void statrTration(ArrayList<String> arrayListStr) {
		this.arrayListStr = arrayListStr;
		initParam();

	}

	private void setListener() {

	}

	private void initView() {
		mView = ((LayoutInflater) mContext
				.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(
				R.layout.cutom_choiceweight, this);
		mViewPager = (CustomViewPager) this
				.findViewById(R.id.fragment_target_viewpager);

	}

}
